package com.xudm.cdg.controller;

import com.alibaba.fastjson2.JSONObject;
import com.xudm.cdg.api.WxyyAgentApi;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/agent")
public class WxyyAgentController {
    @Resource
    private WxyyAgentApi wxyyAgentApi;

    @RequestMapping("/getAnswer")
    public JSONObject getAnswer(@RequestParam String question) {
        return wxyyAgentApi.getAnswer(question);
    }
}
